<div class="container-fluid">
    <div class="block-header">
        <h2>工具 > 创建网站地图</h2>
    </div>
    <!-- Vertical Layout -->
    <div class="row">
        <div class="col-lg-6 col-md-6">
            <div class="card">
                <div class="header">
                    <h2>更新地图</h2>
                </div>
                <div class="body">
                    <div class="alert alert-success sitemap-settings-alert"></div>
                    <form class="sitemap-settings" method="POST">
                        <label for="order_posts_by">更新*</label>
                        <select class="form-control show-tick" id="order_posts_by" name="order_posts_by">
                              <option value="" disabled selected>SiteMap更新率。 默认（每日）</option>
			                  <option value="daily">每日</option>
			                  <option value="always">一直</option>
			                  <option value="hourly">每小时</option>
			                  <option value="weekly">每周</option>
			                  <option value="monthly">每月</option>
			                  <option value="yearly">每年</option>
			                  <option value="never">从不</option>
                        </select>
                        <div class="clearfix"></div>
                        <br><br>
                        <div>注意：这可能需要10分钟.</div>
                        <input type="hidden" name="hash_id" value="<?php echo Wo_CreateSession();?>">
                        <button type="submit" class="btn btn-primary m-t-15 waves-effect">生成</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <!-- #END# Vertical Layout -->
<script>

$(function() {
    var form_sitemap_settings = $('form.sitemap-settings');
    form_sitemap_settings.ajaxForm({
        url: Wo_Ajax_Requests_File() + "?f=admincp&s=update-sitemap",
        beforeSend: function() {
            form_sitemap_settings.find('.waves-effect').text('请稍后..');
        },
        success: function(data) {
            if (data.status == 200) {
                $("html, body").animate({ scrollTop: 0 }, "slow");
                $('.sitemap-settings-alert').html('<i class="fa fa-check"></i> 地图成功创建');
            }
            form_sitemap_settings.find('.waves-effect').text('生成');
        }
    });
});
</script>